#define _CRT_SECURE_NO_WARNINGS  1
#include <stdio.h>
int main()
{
	char str[101];
	while (scanf("%s", str) > 0) 
	{
		int n;
		scanf("%d", &n);
		str[n] = '\0';
		printf("%s\n", str);
	}
}

int main()
{
    long n, k = 0;
    long count = 0;
    while (~scanf("%ld %ld", &n, &k))
    {
        if (k == 0)
        {
            printf("%ld\n", n * n);
            continue;
        }
        for (long j = k + 1; j <= n; j++)
        {
            long help = n % j < k ? 0 : (n % j) - k + 1;
            count += (j - k) * (n / j) + help;
        }
        printf("%ld\n", count);
    }
    return 0;
}


